package com.umgsai.thread.thread65;

/*
 * 一级关联
 */
public class Main {
	public static void main(String[] args) {
		ThreadA a = new ThreadA();
		ThreadB b = new ThreadB();
		ThreadGroup group = new ThreadGroup("My-Thread-Group");
		Thread aThread = new Thread(group, a);
		Thread bThread = new Thread(group, b);
		aThread.start();
		bThread.start();
		System.out.println("活动的线程数：" + group.activeCount());
		System.out.println("线程组的名称：" + group.getName());
	}
}
